package cn.itcast.nems.common.constant;

import lombok.Getter;

/**
 * <p>
 * 付费方式枚举
 * </p>
 *
 * @author zhouwei
 * @since 2023/9/10 3:28 PM
 **/
@Getter
public enum PaymentTypeEum {
    FIRSTPAYMENT("先付费"),
    LASTPAYMENT("定向培训");

    private final String name;

    PaymentTypeEum(String name) {
        this.name = name;
    }

    public static PaymentTypeEum getEnumByCode(String name) {
        PaymentTypeEum[] enums = values();
        for (PaymentTypeEum item : enums) {
            if (item.getName().equals(name)) {
                return item;
            }
        }
        return null;
    }
}
